![]()
![]()
![]()
Introduction
The 3D Metafile is a file format for 3D graphics applications that make use of the QuickDraw 3D graphics library or other object-based 3D graphics libraries. This document describes the 3D Metafile file format.The purposes of the metafile are
This standard is put forward to promote compatibility among 3D graphics applications and is meant to facilitate the transfer and exchange of data between distinct applications. The file format also permits a project to be saved to a file in such a way that it may be resumed or altered at a later time.
- to establish a standard file format for 3D graphics files
- to establish canonical forms for descriptions of familiar 3D graphics objects
The metafile file format permits objects to be labeled and referenced. A metafile may also include one or more tables of contents in which such labels and references are listed. A table of contents may provide a complete catalog of the items contained in a metafile and of all cross-references among those items. However, a metafile is not itself a database and does not have the capabilities of a database. Applications that wish to apply the capabilities of a database to the contents of a metafile must connect that file to a preexisting database program.
The canonical forms for descriptions of 3D graphics objects outlined in this document embody an object- and class-based approach to 3D graphics and reflect the structure of the QuickDraw 3D class hierarchy. This approach can be described briefly as follows. First, a number of basic data types are introduced. Next, more complex data types, called objects, are defined in terms of these basic data types. Finally, similar objects are grouped together to form classes of objects, arranged in a hierarchical structure.
Each class of objects, and thus each object, is correlated with a particular node in that structure. We use the terms parent and child to describe the relationships among objects located at immediately adjacent and connected nodes in the structure. For example, a color attribute may be included in a set of attributes that is assigned to a geometric object. In that case, the geometric object is a parent of the attribute set, which in turn is a parent of the color attribute, while the color attribute is a child of the attribute set, which in turn is a child of the geometric object. See the book 3D Graphics Programming With QuickDraw 3D for complete details on this approach to the classification of 3D graphics objects.
The metafile file format includes two mechanisms that allow two or more objects to be grouped together to form a more complex object having as much hierarchical structure as desired. These mechanisms are the container and the group, which are described in the sections "Containers" on page 1-44 and "Groups" on page 1-194. The format also includes two special objects, file pointers and reference objects, that can be used to instantiate previously specified objects by reference. These objects are described in the sections "File Pointers" on page 1-24 and "Reference Objects" on page 1-37.
This document defines a format for ASCII text files and also defines a format for binary files. The two formats incorporate the same functional features, and there is a one-to-one correspondence between their components. Most objects are represented very similarly in the two formats. However, some objects, such as file pointers, are represented differently in the two file formats, as described below. Each text file has at least one binary file counterpart, and each binary file has at least one text file counterpart, but in general that counterpart is not unique.
3D Metafile Reference © Apple Computer, Inc.